const mongoose = require('mongoose')
const { Schema } = mongoose

// IP 信息记录表
const ipAddr = new Schema({
  ip: {
    type: String,
    required: true
  },
  visitTime: {
    type: Date,
    required: true
  },
  location: {
    type: Array,
    required: true
  },
  provience: {
    type: String
  },
  city: {
    type: String
  }
})

const visitorIpAddrTable = mongoose.model('visitorIpAddrTable', ipAddr)

module.exports = visitorIpAddrTable
